package com.ccjq.jq167.servlet;

import com.ccjq.jq167.po.StudentPo;
import com.ccjq.jq167.service.impl.service_impl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

@WebServlet(name = "TiaoZhuan")
public class TiaoZhuan extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

        service_impl  s=new service_impl();
        List<StudentPo> list=s.select();

        request.setAttribute("list",list);

        request.getRequestDispatcher("/WEB-INF/jsp/ZhuYe.jsp").forward(request,response);


    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        doPost(request,response);
    }
}
